package tech.aistar.day01.homework;

public class EmployeeTest {
    public static void main(String[] args) {
            //1.创建boss
            Employee boss =new Employee(1,"admin",2500.0d);
            boss.setEmployees(new Employee[0]);

            //2.定义下属
            Employee e2=new Employee(2,"tom",1000.0d);
            Employee e3=new Employee(3,"admin",1000.0d);
            Employee e4=new Employee(4,"jack",1600.0d);
            Employee e5=new Employee(5,"ming",1000.0d);
            Employee e6=new Employee(6,"mike",1700.0d);

            //3.boss添加下属
            boss.addEmp(e2);
            boss.addEmp(e3);
            boss.addEmp(e4);
            boss.addEmp(e5);
            boss.addEmp(e6);

            boss.findAll();
            System.out.println("========================================================");
            //4.根据下属id进行删除
            boss.delById(2);

            boss.findAll();

            boss.delById(7);

            System.out.println("========================================================");
            //5.根据工资开除大于1500的员工
            boss.delByPrice(1500.0d);

            boss.findAll();
    }
}
